<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: boxes.php 140 2013-09-22 07:44:23Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 140 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-22 07:44:23 +0000 (Sun, 22 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

$smarty = new Smarty();

define('DIR_WS_BOXES', DIR_FS_CATALOG .'templates/'.CURRENT_TEMPLATE. '/source/boxes/');
define('TEMPLATE_SNIPPETS', DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE. '/html/');
define('FORCE_CACHE',false);
$smarty->assign('tpl_path','templates/'.CURRENT_TEMPLATE.'/');
$smarty->assign('html_tpl_path', CURRENT_TEMPLATE.'/html/');

include(DIR_WS_BOXES.'categories.php');
include(DIR_WS_BOXES.'best_sellers.php');
include(DIR_WS_BOXES.'whats_new.php');

$smarty->assign('copyright','&copy; '.date('Y').' - <a href="'.DIR_WS_CATALOG.'">'.STORE_NAME.'</a> powered by <a href="http://www.seo-mercari.de">SEO:mercari</a>');

if($_SESSION['cart']->count_contents() > 0)
	$smarty->assign('cart_full', true);

$smarty->assign('impress', href_link('shop_content.php', 'coID=4'));

if(isset($_GET['coID']) && $_GET['coID'] == '5')
	$smarty->assign('startpage', true);

# Produktdetailseite
if(isset($_GET['products_id'])) {
	$smarty->assign('BUTTON_PLUS_MOBILE', href_link(FILENAME_PRODUCT_INFO, 'products_id='.$_GET['products_id'].'&qty='.(isset($_GET['qty']) ? ($_GET['qty']+1) : '2')));
	$smarty->assign('BUTTON_MINUS_MOBILE', href_link(FILENAME_PRODUCT_INFO, 'products_id='.$_GET['products_id'].'&qty='.(isset($_GET['qty']) && $_GET['qty']!=1 ? ($_GET['qty']-1) : '1')));
}

# Versandkostenbox
include(DIR_FS_CATALOG .'templates/mobile/source/shipping_dialog.php');
$smarty->assign('shipping_box', getContent());

# Fehler-/Info-/Erfolgsmeldungen
if($message_stack->size > 0) {
	include(DIR_FS_CATALOG .'templates/mobile/source/message_dialog.php');
	$smarty->assign('message_box', messageContent());
}

# Login / Kundenkonto
if(!isset($_SESSION['customer_id'])) {
	$smarty->assign('link', href_link(FILENAME_LOGIN, '', 'SSL'));
	$smarty->assign('button_text', 'Login');
} elseif(isset($_SESSION['customer_id']) && $_SESSION['account_type'] != '0') {
	$smarty->assign('link', href_link(FILENAME_LOGOFF));
	$smarty->assign('button_text', 'Logoff');
}

if (GROUP_CHECK == 'true')
    $group_check = " AND c.group_permission_".$_SESSION['customers_status']['customers_status_id']." = 1 ";
?>